The p4 system supports the cluster model of parallel computation, in which subsets of processes share memory with one another, with the clusters communicating via messages. A procgroup file for a program written for the cluster model might look like this:
This would specify a total of 20 processes, 5 (including the master) running on the local machine (here assumed to be capable of supporting five processes that share memory) together with 5 slaves each on three other shared-memory machines.
p4_get_cluster_ids
receives pointers to two integers. It places the p4-assigned id's of
the first and last ids within the current cluster into the two
arguments (including the remote master).
p4_get_my_cluster_id
returns a unique id (relative to 0) within a cluster of p4-managed
processes. Thus, a cluster master will always have a cluster id of 0.
It is not clear that a separate cluster id is really useful, but the
functionality is provided just in case.
p4_am_i_cluster_master
returns a BOOL value indicating whether the invoking process is the
``cluster master'' process within its cluster.
p4_num_cluster_ids
returns an integer value indicating the number of ids in the current
cluster as started by p4_create_procgroup.
Functions for Message Passing,Functions for Shared Memory,p4 Functions for Managing Processes and Clusters,Top